<%--
  Created by IntelliJ IDEA.
  User: Xiao Yiyun
  Date: 2017/9/8
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>秒杀详情页</title>
    <%@include file="../common/head.jsp"%>
</head>
<body>
    <div class="container">
        <div class="panel panel-default text-center">
            <div class="pannel-heading">
                <h1>${seckill.name}</h1>
            </div>
            <div class="panel-body">
                <h2 class="text-danger">
                    <%-- 显示time图标 --%>
                    <span class="glyhicon glyphicon-time"></span>
                    <%-- 展示倒计时 --%>
                    <span class="glyphicon" id="seckill-box"></span>
                </h2>
            </div>
        </div>
    </div>
    <%-- 登录弹出层，输入电话 --%>
    <div id="userPhoneModal" class="modal fade">
        <div class="modal-dialog">
            <div class="modal-context">
                <div class="modal-header">
                    <h3 class="modal-title text-center">
                        <span class="glyphicon glyphicon-phone"></span>秒杀电话：
                    </h3>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-xs-8 col-xs-offset-2">
                            <input type="text" name="userPhone" id="userPhoneKey"
                            placeholder="填写手机号" class="form-control"/>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <%-- 验证消息 --%>
                    <span id="userPhoneMessage" class="glyphicon"></span>
                    <button type="button" id="userPhoneBtn" class="btn btn-success">
                        <span class="glyphicon glyphicon-phone"></span>
                        Submit
                    </button>
                </div>
            </div>
        </div>
    </div>
</body>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet"
          href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
          crossorigin="anonymous">
    <!-- JQuery文件，务必在bootstrap.min.js之前引用 -->
    <script src="http://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"
            integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
            crossorigin="anonymous">
    </script>
    <%-- 使用CDN获取公共js http://www.bootcdn.cn --%>
    <%-- JQuery cookie操作插件 --%>
    <script src="http://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <%-- JQuery countDown倒计时插件 --%>
    <script src="http://cdn.bootcss.com/jquery.countdown/2.1.0/jquery.countdown.min.js"></script>
    <%-- 开始编写交互逻辑 --%>
    <script src="../js.seckill.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            //使用EL表达式传入参数
            seckill.detail.init({
                seckillId : ${seckill.seckill_id},
                //毫秒时间，方便js直接做解析
                startTime : ${seckill.seckill_start_time.time},
                endTime : ${seckill.seckill_end_time.time}
            });
        });
    </script>
</html>
